﻿using UnityEngine;
using System.Collections;
using UnityEngine.EventSystems;
using UnityEngine.UI;

public class Step1 : StepProcess, IPointerClickHandler
{

    void Update()
    {
        if (m_processExecutable)
        {
            //此处添加执行内容 
            //。。。
            //
            if (m_processStep == 1)
            {
                Debug.Log("1");
                m_processStep++;
                this.GetComponent<Image>().color = Color.red;
            }
            if (m_processStep == 2)
            {
                //实验完成需要添加下面这句
                m_processFinished = true;

            }
        }
    }

    void IPointerClickHandler.OnPointerClick(PointerEventData eventData)
    {
        if (m_processExecutable)
        {
            this.GetComponent<Image>().color = Color.green;
            m_processStep++;
        }
        else
        {
            if (!m_processError)
            {
                StepManager.ErrorReminder();
            }
        }
    }
}
